[MLI-7222] test(api): parametrize cloud backend selection by cloud_provider#844
Merged
lorenzo-norcini-scale merged 2 commits intoJun 23, 2026
Conversation
…-7222) Add a parametrized test pinning the concrete backend class selected for each cloud_provider (aws/azure/gcp/onprem) across queue delegate, filesystem, artifact, file-storage, docker repository, fine-tune repo + events repo, and autoscaling-metrics gateway. Subsumes and replaces the single-provider test_gcp_provider_selects_gcp_implementations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…oud-backend-selection-by-cloud_provider
billyang-scale
approved these changes
Jun 23, 2026
billyang-scale
left a comment
Collaborator
There was a problem hiding this comment.
congrats to your first PR!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Parametrized unit test pinning the concrete backend class selected for each
cloud_provider(aws/azure/gcp/onprem) in the API dependency wiring. Replaces the single-providertest_gcp_provider_selects_gcp_implementations.Test-only change.
Resolves MLI-7222.
🤖 Generated with Claude Code
Greptile Summary
This PR replaces the single-provider
test_gcp_provider_selects_gcp_implementationstest with a parametrizedtest_cloud_provider_selects_expected_backendsthat covers all four cloud backends (aws, azure, gcp, onprem) in one sweep. It also widens the assertion surface to includellm_fine_tune_repositoryandinference_autoscaling_metrics_gateway, both of which were unverified before._PROVIDER_CASESdrives fourpytest.paramentries; each pins the full set of concrete backend classes selected by_get_external_interfacesfor thatcloud_provider.isinstancechecks forllm_fine_tuning_service.llm_fine_tune_repositoryandresource_gateway.inference_autoscaling_metrics_gatewaythat were absent from the previous GCP-only test.ASBInferenceAutoscalingMetricsGatewayeven for GCP (where it is never instantiated). The new test omits that patch; for the azure case it correctly lets the real (no-__init__) class instantiate so that theisinstanceassertion is meaningful.Confidence Score: 5/5
Test-only change; no production code is modified and the new parametrized test correctly mirrors the wiring logic in dependencies.py for all four cloud backends.
Every expected class was cross-checked against the actual branch conditions in _get_external_interfaces. The docker registry inference (infer_registry_type) correctly maps the chosen prefixes to ecr/acr/gar, and the onprem case explicitly sets docker_registry_type to bypass prefix inference. Azure-specific classes (ABSFilesystemGateway, ASBInferenceAutoscalingMetricsGateway) have no init that touches Azure SDKs, so dropping the ASBInferenceAutoscalingMetricsGateway mock is safe and makes the isinstance assertion meaningful. No logic gaps were found.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD CP[cloud_provider] --> AWS[aws] CP --> AZURE[azure] CP --> GCP[gcp] CP --> ONPREM[onprem] AWS --> AWS_Q[SQSQueueEndpointResourceDelegate] AWS --> AWS_FS[S3FilesystemGateway] AWS --> AWS_ART[S3LLMArtifactGateway] AWS --> AWS_FILE[S3FileStorageGateway] AWS --> AWS_DOCKER[ECRDockerRepository] AWS --> AWS_FT[S3FileLLMFineTuneRepository] AWS --> AWS_METRICS[RedisInferenceAutoscalingMetricsGateway] AZURE --> AZ_Q[ASBQueueEndpointResourceDelegate] AZURE --> AZ_FS[ABSFilesystemGateway] AZURE --> AZ_ART[ABSLLMArtifactGateway] AZURE --> AZ_FILE[ABSFileStorageGateway] AZURE --> AZ_DOCKER[ACRDockerRepository] AZURE --> AZ_FT[ABSFileLLMFineTuneRepository] AZURE --> AZ_METRICS[ASBInferenceAutoscalingMetricsGateway] GCP --> GCP_Q[GcpPubSubQueueEndpointResourceDelegate] GCP --> GCP_FS[GCSFilesystemGateway] GCP --> GCP_ART[GCSLLMArtifactGateway] GCP --> GCP_FILE[GCSFileStorageGateway] GCP --> GCP_DOCKER[GARDockerRepository] GCP --> GCP_FT[GCSFileLLMFineTuneRepository] GCP --> GCP_METRICS[RedisInferenceAutoscalingMetricsGateway] ONPREM --> OP_Q[OnPremQueueEndpointResourceDelegate] ONPREM --> OP_FS[S3FilesystemGateway] ONPREM --> OP_ART[S3LLMArtifactGateway] ONPREM --> OP_FILE[S3FileStorageGateway] ONPREM --> OP_DOCKER[OnPremDockerRepository] ONPREM --> OP_FT[S3FileLLMFineTuneRepository] ONPREM --> OP_METRICS[RedisInferenceAutoscalingMetricsGateway]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD CP[cloud_provider] --> AWS[aws] CP --> AZURE[azure] CP --> GCP[gcp] CP --> ONPREM[onprem] AWS --> AWS_Q[SQSQueueEndpointResourceDelegate] AWS --> AWS_FS[S3FilesystemGateway] AWS --> AWS_ART[S3LLMArtifactGateway] AWS --> AWS_FILE[S3FileStorageGateway] AWS --> AWS_DOCKER[ECRDockerRepository] AWS --> AWS_FT[S3FileLLMFineTuneRepository] AWS --> AWS_METRICS[RedisInferenceAutoscalingMetricsGateway] AZURE --> AZ_Q[ASBQueueEndpointResourceDelegate] AZURE --> AZ_FS[ABSFilesystemGateway] AZURE --> AZ_ART[ABSLLMArtifactGateway] AZURE --> AZ_FILE[ABSFileStorageGateway] AZURE --> AZ_DOCKER[ACRDockerRepository] AZURE --> AZ_FT[ABSFileLLMFineTuneRepository] AZURE --> AZ_METRICS[ASBInferenceAutoscalingMetricsGateway] GCP --> GCP_Q[GcpPubSubQueueEndpointResourceDelegate] GCP --> GCP_FS[GCSFilesystemGateway] GCP --> GCP_ART[GCSLLMArtifactGateway] GCP --> GCP_FILE[GCSFileStorageGateway] GCP --> GCP_DOCKER[GARDockerRepository] GCP --> GCP_FT[GCSFileLLMFineTuneRepository] GCP --> GCP_METRICS[RedisInferenceAutoscalingMetricsGateway] ONPREM --> OP_Q[OnPremQueueEndpointResourceDelegate] ONPREM --> OP_FS[S3FilesystemGateway] ONPREM --> OP_ART[S3LLMArtifactGateway] ONPREM --> OP_FILE[S3FileStorageGateway] ONPREM --> OP_DOCKER[OnPremDockerRepository] ONPREM --> OP_FT[S3FileLLMFineTuneRepository] ONPREM --> OP_METRICS[RedisInferenceAutoscalingMetricsGateway]Reviews (1): Last reviewed commit: "Merge branch 'main' into lorenzonorcini/..." | Re-trigger Greptile